<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="">
		<meta name="author" content="">
		<!-- Bootstrap core CSS -->
		<link th:href="@{/airent/css/bootstrap.min.css}" rel="stylesheet">

		<!-- Custom styles for this template -->
		<link th:href="@{/airent/css/dashboard.css}" rel="stylesheet">
		<!-- Bootstrap core CSS -->
<!--		<link th:href="@{/asserts/css/bootstrap.min.css}" rel="stylesheet">-->

		<!-- Custom styles for this template -->
<!--		<link th:href="@{/asserts/css/dashboard.css}" rel="stylesheet">-->
		<style type="text/css">
			/* Chart.js */

			@-webkit-keyframes chartjs-render-animation {
				from {
					opacity: 0.99
				}
				to {
					opacity: 1
				}
			}

			@keyframes chartjs-render-animation {
				from {
					opacity: 0.99
				}
				to {
					opacity: 1
				}
			}

			.chartjs-render-monitor {
				-webkit-animation: chartjs-render-animation 0.001s;
				animation: chartjs-render-animation 0.001s;
			}
		</style>
	</head>

	<body>
	<div th:replace="~{head/topBar::topBar(activeUri='manage')}"></div>

		<div class="container-fluid">
			<div class="row">
				<div th:replace="~{commons/sideBar :: sideBar(activeUri='examine')}"></div>

				<main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
					<h2>Section title</h2>
					<div class="table-responsive">
						<form th:action="@{/house/examine}" method="post">
							<label><span class="STYLE3">审核状态:</span>
								<input type="text" name="examine" id="examine"  placeholder="请输入0或1或2">
							</label>
							<input type="submit" value="搜索">
						</form>
						<table class="table table-striped table-sm">
							<thead>
								<tr>
									<th>小区名字</th>
									<th>出租类型</th>
									<th>房屋面积</th>
									<th>房屋类型</th>
									<th>房屋租金</th>
									<th>房屋状态</th>
									<th>审核状态</th>
									<th>发布时间</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<tr th:each="e:${pageInfo.list}">
									<td th:text="${e.villageName}"></td>
									<td th:text="${e.rentType}"></td>
									<td th:text="${e.houseMeasure}"></td>
									<td th:text="${e.houseType}"></td>
									<td th:text="${e.rentPrice}"></td>
									<td th:text="${e.houseState}"></td>
									<td th:text="${e.examine}">sit</td>
									<td th:text="${#dates.format(e.rentDate, 'yyyy-MM-dd')}">dolor</td>
									<td>
										<button th:onclick="|yesUpdate(${e.houseId})|">审核通过</button>
										<button th:onclick="|noUpdate(${e.houseId})|">审核未过</button>
									</td>
								</tr>

								<tr>
									<td>
										<div>
											<span>当前<span th:text="${pageInfo.pageNum}"></span> /<span th:text="${pageInfo.pages}"></span>页  总计 :<span th:text="${pageInfo.total}"></span>条</span>
											<button th:onclick="|go(1)|">首页</button>
											<button th:onclick="|go('${pageInfo.prePage}')|">上一页</button>
											<button th:onclick="|go('${pageInfo.nextPage}')|">下一页</button>
											<button th:onclick="|go('${pageInfo.pages}')|">尾页</button>
										</div>
									</td>
								</tr>

							</tbody>
						</table>
					</div>
				</main>
			</div>
		</div>

		<!-- Bootstrap core JavaScript
    ================================================== -->
		<!-- Placed at the end of the document so the pages load faster -->
<!--	<script th:src="@{/airent/plugins/jquery/jquery.min.js}"></script>-->

<!--	<script type="text/javascript" th:src="@{/asserts/js/jquery-3.2.1.slim.min.js}" ></script>-->
<!--		<script type="text/javascript" th:src="@{/asserts/js/popper.min.js}" ></script>-->
<!--	<script th:src="@{/airent/plugins/bootstrap/bootstrap-4.4.1-dist/js/bootstrap.min.js}"></script>-->

<!--		&lt;!&ndash; Icons &ndash;&gt;-->
<!--		<script type="text/javascript" th:src="@{/asserts/js/feather.min.js}" ></script>-->

	<!-- Bootstrap core JavaScript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	<script type="text/javascript" th:src="@{/airent/plugins/jquery/jquery.min.js}"></script>
	<script type="text/javascript" th:src="@{/airent/js/popper.min.js}"></script>
	<script type="text/javascript" th:src="@{/airent/js/bootstrap.min.js}"></script>

	<!-- Icons -->
	<script type="text/javascript" th:src="@{/airent/js/feather.min.js}"></script>
	<script>
		feather.replace()
	</script>
	<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
		<script th:inline="javascript">
			function go(num) {
				var examine=$("#examine").val();
				var url=[[@{/house/examine}]]+"?pageNow="+num+"&examine="+examine;
				location.href = url;
			}
		</script>
	<script>
		function yesUpdate(id) {
			var url="/house/yesUpdate";
			var param="hid="+id;
			$.post(url,param,function (data) {
				//alert(data);
			})
			window.location.reload();
		}

		function noUpdate(id) {
			var url="/house/noUpdate";
			var param="hid="+id;
			$.post(url,param,function (data) {
				//alert(data);
			})
			window.location.reload();

		}
	</script>

		<!-- Graphs -->
	<script type="text/javascript" th:src="@{/airent/js/Chart.min.js}"></script>

	</body>

</html>
